/**
 * type 图片类型
 * imgId 图片组件当前选中imgID
 * imgUrl 图片组件当前选中imgurl
 */
const state = {
  // 子组件类型及其索引
  childItem: {
    index: Number,
    name: ""
  },
  // 列表
  listPageStyle: {
    conStyle: {
      background: "#ffffff",
      top: "10px"
    },
    fontColor: {
      titleColor: "#333", // 标题颜色
      tagColor: "#F56C6C", // 标签颜色
      priceColor: "#333", // 价格颜色
      evalColor: "#989797" // 评论颜色
    },
    TabCard: {
      title: "选项",
      link: ""
    },
    tabArray: [],
    listStyle: 0,
    essentialKey: {
      Industrylist: "电商",
      listNumber: "",
      width: "375px",
      height: "100px",
      borderRadius: "",
      background: "",
      listNum: 3
    },
    childStyle: [
      {
        name: "Activity"
      },
      {
        name: "subheading"
      },
      {
        name: "listTitle",
        constyle: {
          left: 130,
          top: 12,
          width: 230,
          height: 40
        },
        style: {
          fontSize: "16px",
          color: "#333333",
          textDecoration: "none",
          fontStyle: "",
          fontWeight: "",
          textAlign: ""
        },
        key: "",
        data: "标题内容"
      },
      {
        name: "listBtn",
        constyle: {
          left: 284,
          top: 55,
          width: 80,
          height: 28
        },
        style: {
          fontSize: "12px",
          background: "rgba(255,103,103,1)",
          borderRadius: "12px",
          textAlign: "center",
          lineHeight: "28px",
          color: "#ffffff"
        },
        data: "立即购买"
      },
      {
        name: "listImg",
        constyle: {
          left: 10,
          top: 10,
          width: 110,
          height: 110
        },
        style: {
          width: "100%",
          height: "100%"
        },
        data: "http://img.tupian114.com/20131104/2236142472.jpg"
      },
      {
        name: "listOldText",
        constyle: {
          left: 120,
          top: 36,
          width: 80,
          height: 28
        },
        style: {
          fontSize: "14px",
          textAlign: "center",
          color: "#FF8000",
          fontWeight: "400"
        },
        data: "120元"
      },
      {
        name: "listInventory",
        constyle: {
          left: 130,
          top: 60,
          width: 80,
          height: 28
        },
        style: {
          fontSize: "16px",
          textAlign: "center",
          color: "#A2A2A2"
        },
        data: "剩余200"
      },
      {
        name: "listLabels",
        constyle: {
          left: 10,
          top: 10,
          width: 35,
          height: 16
        },
        style: {
          fontSize: "12px",
          textAlign: "center",
          color: "#FF365C",
          background: "rgba(253,234,238,1)",
          borderRadius: "8px",
          display: "flex",
          alignItems: "center",
          justifyContent: "center"
        },
        data: "标签"
      },
      {
        name: "listTime",
        constyle: {
          left: 283,
          top: 15,
          width: 50,
          height: 20
        },
        style: {
          fontSize: "12px",
          textAlign: "center",
          color: "#A2A2A2"
        },
        data: "16:05:52"
      }
    ]
  }
};

const mutations = {
  // 列表数据
  SET_ListObj: (state, listPageStyle) => {
    state.listPageStyle = listPageStyle;
  },
  // 列表中当前子元素的索引及其名称
  SET_ChildItem: (state, childObj) => {
    state.childItem = childObj;
  }
};

export default {
  namespaced: true,
  state,
  mutations
};
